﻿<View:LayoutAwarePage x:Name="pageRoot"
                      x:Class="WinRTClient.Views.EventDetailView"
                      IsTabStop="false"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      xmlns:View="using:StyleMVVM.View"
                      View:ViewModel.Name="EventDetailViewModel"
                      mc:Ignorable="d">
    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton"
                    Click="GoBack"
                    IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}"
                    Style="{StaticResource BackButtonStyle}" />
            <TextBlock x:Name="pageTitle"
                       Text="Veranstaltung"
                       Style="{StaticResource PageHeaderTextStyle}"
                       Grid.Column="1" />
        </Grid>
        <FlipView x:Name="flipView"
                  AutomationProperties.AutomationId="ItemsFlipView"
                  AutomationProperties.Name="Item Details"
                  TabIndex="1"
                  Grid.Row="1"
                  Margin="0,-3,0,0"
                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                  ItemsSource="{Binding Events}">
            <FlipView.ItemTemplate>
                <DataTemplate>
                    <Border HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Background="#6B6B6B">
                        <Grid HorizontalAlignment="Left"
                              VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="80" />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <TextBlock Text="Veranstaltung:"
                                       Margin="20,8"
                                       Style="{StaticResource SubheaderTextStyle}" />
                            <TextBlock Grid.Column="1"
                                       Margin="20,8"
                                       Text="{Binding Description}"
                                       Style="{StaticResource SubheaderTextStyle}" />
                            <TextBlock Grid.Row="1"
                                       Margin="20,8"
                                       Text="Ort:" />
                            <TextBlock Grid.Row="1"
                                       Margin="20,8"
                                       Grid.Column="1"
                                       Text="{Binding Room}" />
                        </Grid>
                    </Border>
                </DataTemplate>
            </FlipView.ItemTemplate>
        </FlipView>
    </Grid>
</View:LayoutAwarePage>
